home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.4 Applications 1997 August / SGI IRIX 6.4 Applications 1997 August.iso / dist / mmailp.idb / usr / lib / Zmail / bindkey.hlp.z / bindkey.hlp
Encoding:
Text File  |  1997-01-22  |  43.9 KB  |  1,019 lines

  1. CUSTOMIZING Z-MAIL LITE KEYBINDINGS
  2. -----------------------------------
  3.  
  4. In Z-Mail Lite, the action taken when a key is pressed is determined
  5. by that key's *binding*.  For instance, the binding for <ctrl+L> is
  6. `redraw', an action which erases and redraws the entire screen.
  7.  
  8. The effective keybindings vary according to context.  For instance, in
  9. a list, pressing <space> selects an item in the list.  However, in an
  10. editable text area, pressing <space> inserts a blank space, just as
  11. you'd expect.  And in a read-only text area, <space> scrolls to the
  12. next page of the document.
  13.  
  14. In order to permit different bindings for different contexts, each
  15. area that can have the input focus belongs to a *class* which
  16. describes all the areas that share a common behavior.  For instance,
  17. the message summaries in the main screen and the list of files in a
  18. filefinder dialog both belong to the `List' class, in which pressing
  19. <space> means to select an item.
  20.  
  21. Most classes are *subclasses* of other classes.  For instance, `Text'
  22. is a subclass of `Widget', and we say `Widget' is the *superclass* of
  23. `Text'.  While `Text' describes behavior that is specific to how text
  24. works---for instance, <ctrl+A> moves to the beginning of a
  25. line---`Widget' describes behavior that is more general.  For
  26. instance, `Widget' says that <ctrl+X w> should show info on the
  27. current area.  Since Text is a subclass of Widget, <ctrl+X w> works in
  28. texts.  List is also a subclass of Widget, so <ctrl+X w> works in
  29. lists, too.
  30.  
  31. To summarize:  a subclass behaves like its superclass, then adds more
  32. specific behavior.  We say a subclass *inherits* behavior from its
  33. superclass.
  34.  
  35.  
  36. THE BINDKEY COMMAND
  37. -------------------
  38.  
  39. The `bindkey' command is used to create a keybinding; that is, to
  40. *bind* a key to an action.  The actions available depend on the
  41. context of the keybinding.  Here is an example.
  42.  
  43.     bindkey -c Text \<ctrl+A> text-select-all
  44.  
  45. This command says that in areas belonging to class `Text', the
  46. keystroke <ctrl+A> should perform the `text-select-all' action, which
  47. causes all the text to become selected.  It would not have been
  48. possible to write
  49.  
  50.     bindkey -c List \<ctrl+A> text-select-all           # Won't work!
  51.  
  52. because `text-select-all' is a `Text'-class action, not a `List'-class
  53. action.  (A table showing each class's available actions appears
  54. below.)
  55.  
  56. Because `Text' is a subclass of `Widget', it *is* possible to bind
  57. `Widget'-class actions in `Text' contexts:
  58.  
  59.     bindkey -c Text \<ctrl+I> widget-info
  60.  
  61. This command says that in `Text' areas, <ctrl+I> should give info on
  62. the selected area, just like <ctrl+X w> does elsewhere.  The <ctrl+I>
  63. *binding* is specific to Text areas, though the `widget-info' *action*
  64. is not.
  65.  
  66. Areas that can have the input focus are frequently *contained* within
  67. other areas (which themselves may be contained within still other
  68. areas).  For instance, the list of message summaries is contained
  69. within the main screen, which belongs to the class `Main' and can
  70. therefore have its own keybindings.  Here is an example.
  71.  
  72.     bindkey -c Main \<ctrl+S> goto-main-summaries
  73.  
  74. This means that when <ctrl+S> is pressed anywhere in the main screen,
  75. the focus will move to the message summaries list.  The focus must be
  76. in some area contained within the main screen for this to work.
  77. However, that area may have its own binding for <ctrl+S>.  If it does,
  78. then that more-specific binding will be used, and not the main
  79. screen's <ctrl+S> binding.
  80.  
  81. If there is an unwanted keybinding in a smaller context which is
  82. preventing the preferred keybinding in a larger context from being
  83. used, you may remove it with "unbindkey".  For example, Z-Mail Lite
  84. includes this keybinding for the Main screen:
  85.  
  86.     bindkey -c Main q zscript quipt
  87.  
  88. but this won't work in the message summaries list, since in that
  89. context, q is bound to `list-jump-to'.  Remedy the situation with:
  90.  
  91.     unbindkey main-summaries q
  92.  
  93. To summarize:  Keys can be bound in areas that contain other areas,
  94. but bindings for smaller areas are used before bindings for
  95. surrounding areas are checked.  We say the keystroke *propagates*
  96. outward, searching for an area to handle it.
  97.  
  98. There is one "outermost" container in Z-Mail Lite which conceptually
  99. "contains" the entire screen.  It belongs to a class called
  100. `Zmliteapp'.
  101.  
  102. All areas are ultimately contained within the `Zmliteapp' container.
  103. For example, the message summaries list is contained within the main
  104. screen, and the main screen is contained within the `Zmliteapp' area.
  105. If a key is pressed in the message summaries, and the message
  106. summaries has no binding for it, then the main screen's bindings are
  107. checked.  If the main screen has no binding for it, then the
  108. `Zmliteapp' container is checked.  This is where the binding for
  109. <ctrl+L> lives, for example:
  110.  
  111.     bindkey -c Zmliteapp \<ctrl+L> redraw
  112.  
  113. No matter where <ctrl+L> is pressed, if no area has bound it to some
  114. other action, the keystroke will ultimately find its way to the
  115. encompassing `Zmliteapp' and redraw the screen.
  116.  
  117. A keybinding may be longer than a single keystroke; in fact, Z-Mail
  118. Lite has many two-keystroke bindings.  For instance, <ctrl+X ctrl+N>
  119. is an alternative way to "tab" from one field to the next.
  120.  
  121. If a two-keystroke sequence is bound, it is not possible to bind the
  122. sequence's first key to something else without losing the
  123. two-keystroke sequence.  For instance, since <ctrl+X ctrl+N> means
  124. "tab to the next area", it is not possible to also make <ctrl+X> mean
  125. "exit the application" (say).  The reason is that when <ctrl+X> is
  126. pressed, Z-Mail Lite must be able to know whether to await more
  127. keypresses, or whether to execute the action for <ctrl+X>.  If you do
  128. re-bind a key or keysequence that is a prefix for other, longer
  129. sequences, those longer sequences will be deleted.
  130.  
  131. Generally speaking, Z-Mail Lite only uses <ESC> and <ctrl+X> as
  132. prefixes for multi-keystroke bindings.
  133.  
  134. Many areas in Z-Mail Lite have *names* so that they can be
  135. distinguished from other areas in the same class.  For instance, the
  136. row of buttons at the bottom of the Keybinding dialog (which appears
  137. when <ESC k> is pressed) belongs to the class `ActionArea'.  This is
  138. the same class that contains the row of buttons that appears at the
  139. bottom of the "Open Folder ..." dialog.  It would be wrong to try:
  140.  
  141.     bindkey -c ActionArea S buttonpanel-invoke "Save"   # Wrong
  142.  
  143. because that means "in all `ActionAreas', <S> should press the Save
  144. button"; however, most `ActionAreas' have no Save button.  It would be
  145. right to use:
  146.  
  147.     bindkey help-aa S buttonpanel-invoke "Save"
  148.  
  149. because help-aa is the name of the specific `ActionArea' that appears
  150. in the Keybinding dialog.  Note that when an *area's* name is used
  151. instead of a *class's* name, the "-c" is omitted from the `bindkey'
  152. command.  "-c" means "class".
  153.  
  154.  
  155. ADDITIONAL BINDKEY ARGUMENTS
  156. ----------------------------
  157.  
  158. The full syntax for the bindkey command is
  159.  
  160.     bindkey [-l LABEL] [-d DOC] [-c] CLASS/NAME SEQUENCE ACTION [ARGUMENT]
  161.  
  162. where CLASS/NAME is either the class in which to bind a keysequence
  163. (when "-c" is given) or the name of an area in which to bind a
  164. keysequence (when "-c" is omitted); SEQUENCE is the keysequence to
  165. bind; ACTION is the name of the action to bind the keysequence to; and
  166. ARGUMENT is optional additional information required by certain
  167. actions (see below).
  168.  
  169. If `-l LABEL' is given, and SEQUENCE is one of \<f1> through \<f8>,
  170. then when this keybinding is in effect, LABEL will appear at the
  171. bottom of the screen in the appropriate "function key label" position.
  172.  
  173. If `-d DOC' is given, then DOC, which should be a brief documentation
  174. string, will appear in the keybinding dialog to describe this
  175. keybinding.  The keybinding dialog can be seen by pressing `esc k'.
  176.  
  177.  
  178. NAMING KEYS
  179. -----------
  180.  
  181. A key name in the SEQUENCE argument may be a single character, a
  182. CTRL-character or ESC-character combination, or any of the keystrokes
  183. listed below.
  184.  
  185. Single characters are case-sensitive, so you may bind one action to
  186. "J" and another action in the same context to "j".  If you specify
  187. either the backslash (\) or caret (^) characters, you must precede
  188. them with a backslash, as in \\ and \^.
  189.  
  190. CTRL-character combinations can be written as \<ctrl+X> or \<c-X>,
  191. where X is any letter or one of these symbols:
  192.  
  193.     [ \ ] ^ _
  194.  
  195. CTRL-characters are not case-sensitive, so CTRL+X is the same as
  196. CTRL+x.
  197.  
  198. Other CTRL-character pairings (such as CTRL+TAB or CTRL+2) are not
  199. permitted.
  200.  
  201. Many other characters and keys have special names and some have
  202. multiple synonyms:
  203.  
  204.  ^X           CTRL+X (X may be any letter or [,\,],^, or _)
  205.  \<nul>       the NUL character (ASCII 0)
  206.  \t or \<tab> the TAB character (ASCII 9)
  207.  \n or \<newline>   
  208.               the NEWLINE character (ASCII 10)
  209.  \r or \<return>  
  210.               the CARRIAGE RETURN character (ASCII 13)
  211.  ^[ or \e or \<esc>
  212.               the ESCAPE character (ASCII 27)
  213.  ^\           ASCII 28
  214.  ^]           ASCII 29
  215.  ^^           ASCII 30
  216.  ^_           ASCII 31
  217.  \<space>     the SPACE character (ASCII 32), this can also 
  218.               be written as a blank space, but it must be quoted.
  219.  ^? or \<del> delete (ASCII 127)
  220.  \<down>      the down-arrow key
  221.  \<up>        the up-arrow key
  222.  \<left>      the left-arrow key
  223.  \<right>     the right-arrow key
  224.  \<insert>    the insert key
  225.  \<delete>    the delete key
  226.  \<home>      the home key
  227.  \<end>       the end key
  228.  \<pageup>    the page-up key
  229.  \<pagedown>  the page-down key
  230.  \<fN>        function key number N (e.g. \<f3>).
  231.  \octal-num   a three-digit byte value in octal notation (for
  232.           instance, \033 for the ESCAPE character)
  233.  
  234. To write multi-keystroke keysequences, simply string the key names
  235. together.  Example:
  236.  
  237.     bindkey -c App \<ctrl+X>\<ctrl+P> focus-previous
  238.  
  239.  
  240. CLASSES
  241. -------
  242.  
  243. Here are the Z-Mail Lite bindkey classes.  Indentation shows
  244. inheritance.  Each class's actions, if any, are listed under the class
  245. name and description.  Default keybindings in Z-Mail Lite are listed
  246. in square-brackets, in abbreviated notation, in the right margin.
  247.  
  248.  
  249.   *  Widget                             A superclass for all areas.
  250.                                         Everything is a Widget.
  251.  
  252.      do-sequence                        A special action that uses extra
  253.                                         information to invoke *other*
  254.                                         actions in other areas.  Refer to
  255.                                         the section on `do-sequence', below.
  256.  
  257.      widget-info                        Report the name and class of the
  258.                                         current area and its primary
  259.                                         container.
  260.  
  261.     **  App                             A very generic class describing an
  262.                                         application.
  263.  
  264.         focus-next                      "Tab" to next area.            [tab]
  265.  
  266.         focus-previous                  "Tab" to the previous area.        [c-x c-p]
  267.  
  268.       ***  Cursesapp                    A full-screen application that uses
  269.                                         "curses" for display.
  270.  
  271.            redraw                       Erase the screen and redraw it.        [c-l]
  272.  
  273.          ****  Zmliteapp                The Z-Mail Lite application, which
  274.                                         is a full-screen application based
  275.                                         on curses.
  276.  
  277.                show-keys                Bring up the keybinding dialog.        [esc k]
  278.  
  279.     **  Buttonpanel                     Any area that contains one or more
  280.                                         buttons.
  281.  
  282.         buttonpanel-click               Activate the selected button.           [space]
  283.         buttonpanel-down                Move the cursor down.                   [c-n]
  284.         buttonpanel-first               Move to the first button.               [esc <]
  285.         buttonpanel-invoke              Invoke a button by name.
  286.  
  287.         buttonpanel-jump-to             Jump to the next button whose label
  288.                                         begins with the letter or number
  289.                                         that invoked this action.
  290.  
  291.         buttonpanel-last                Move to the last button.                [esc >]
  292.         buttonpanel-left                Move the cursor left.                   [c-b]
  293.         buttonpanel-next-page           Show the next pageful of buttons        [c-v]
  294.                                         (for scrolling Buttonpanels).
  295.  
  296.         buttonpanel-previous-page       Show the previous pageful of            [esc v]
  297.                                         buttons.
  298.  
  299.         buttonpanel-right               Move the cursor right.                  [c-f]
  300.         buttonpanel-scroll-down         Scroll the buttons downward (for        [esc q]
  301.                                         scrolling Buttonpanels).
  302.  
  303.         buttonpanel-scroll-up           Scroll the buttons upward.              [esc z]
  304.         buttonpanel-up                  Move the cursor up.                     [c-p]
  305.  
  306.       ***  ActionArea                   A Buttonpanel that appears at the
  307.                                         bottom of a Dialog, where the
  308.                                         dialog's actions are provided.
  309.  
  310.       ***  Menu                         All menus.
  311.  
  312.            menu-cancel                  Dismiss the current menu.
  313.            menu-cancel-all              Dismiss all pending menus.              [tab]
  314.            menu-down                    Move the cursor down.                   [c-n]
  315.            menu-left                    Move the cursor left.                   [c-b]
  316.            menu-right                   Move the cursor right.                  [c-f]
  317.            menu-search                  Like buttonpanel-jump-to, but if the
  318.                                         result is a submenu, the submenu is
  319.                                         opened.
  320.  
  321.            menu-up                      Move the cursor up.                     [c-p]
  322.  
  323.          ****  PullrightMenu            All pull-right menus.
  324.  
  325.       ***  Radiogroup                   A Buttonpanel consisting solely of
  326.                                         toggle buttons, of which at most one
  327.                                         can be "on."
  328.  
  329.       ***  Togglegroup                  A Buttonpanel consisting solely of
  330.                                         toggle buttons, of which any number
  331.                                         may be "on."
  332.  
  333.     **  Dialog                          All full-screen or popup dialogs.
  334.  
  335.         dialog-cancel                   Cancel the dialog.                      [esc esc]
  336.         dialog-close                    Close the dialog without canceling.
  337.         goto-action-area                Move the input focus to the dialog's    [esc a]
  338.                                         ActionArea, if it has one.
  339.  
  340.         pick-action-area                Invoke a button in the dialog's
  341.                                         action area by name.
  342.  
  343.         show-help                       Bring up a Help Index dialog.           [f1]
  344.         zscript                         Execute a Z-Script command.
  345.         zscript-prompt                  Present a Z-Script prompt.              [esc :]
  346.  
  347.       ***  Popup                        All popup (i.e. non-full-screen)
  348.                                         dialogs.
  349.  
  350.          ****  Ask                      All Popup dialogs that ask a
  351.                                         question.
  352.  
  353.             *****  FileAsk              All Ask dialogs that ask for a
  354.                                         filename.
  355.  
  356.                ******  AddfolderAsk     A FileAsk dialog that asks for the
  357.                                         name of a folder to open.
  358.  
  359.                ******  NewfolderAsk     A FileAsk dialog that asks for the
  360.                                         name of a folder to create.
  361.  
  362.                ******  RenamefolderAsk
  363.                                         A FileAsk dialog that asks for a
  364.                                         folder to rename.
  365.  
  366.             *****  InputAsk             An Ask dialog that asks for a
  367.                                         response to be typed in.
  368.  
  369.                ******  AddressAsk       An InputAsk dialog that asks for an
  370.                                         e-mail address to be typed in.
  371.  
  372.                ******  CommandAsk       An InputAsk dialog that asks for a
  373.                                         Z-Script command to be typed in.
  374.  
  375.             *****  ListAsk              An Ask dialog that asks the user to
  376.                                         select an item from a list.
  377.  
  378.             *****  MsgAsk               An Ask dialog that asks the user to
  379.                                         select a message from a list of
  380.                                         message summaries.
  381.  
  382.          ****  Attachlist               A Popup dialog that lists the
  383.                                         attachments for the current message
  384.                                         or composition.
  385.  
  386.             *****  ComposeAttachlist    The Attachlist dialog for the
  387.                                         Compose screen.
  388.  
  389.             *****  MessageAttachlist    The Attachlist dialog for the
  390.                                         Message screen.
  391.  
  392.          ****  Attachtype               The Popup dialog in which the user
  393.                                         chooses an attachment's type and
  394.                                         encoding.
  395.  
  396.          ****  Choosealias              The Popup dialog available in the
  397.                                         Compose screen from which the user
  398.                                         may choose aliases for addressing
  399.                                         the current composition.
  400.  
  401.          ****  Compoptions              The Popup dialog containing the
  402.                                         options for the current composition.
  403.  
  404.          ****  Datesearch               The Popup dialog for searching
  405.                                         messages by date.
  406.  
  407.          ****  Dynamicheaders           The Popup dialog in which the user
  408.                                         sets the values of any dynamic
  409.                                         headers.
  410.  
  411.          ****  Helpindex                The help index dialog.
  412.  
  413.          ****  MenuPopup                All Popup dialogs that have their
  414.                                         own menubars.
  415.  
  416.                cancel-menu              Return from the menubar.                [esc esc]
  417.                goto-menu                Jump to the menubar.                    [esc /]
  418.                pick-menu                Invoke a menu item by name.  See the
  419.                                         section on `pick-menu', below.
  420.  
  421.             *****  Addrbrowse           All address browsing dialogs.
  422.  
  423.                ******  ComposeAddrbrowse
  424.                                         The address browsing dialog that
  425.                                         appears in the Compose screen.
  426.  
  427.             *****  Help                 The ordinary help dialog.
  428.  
  429.             *****  Pager                The "text pager" dialog.
  430.  
  431.          ****  Multikey                 The multikey dialog.
  432.  
  433.          ****  Notifier                 All dialogs that present "Yes/No",
  434.                                         "Ok/Cancel", and similar options.
  435.  
  436.          ****  Patternsearch            The Popup dialog for searching
  437.                                         messages by text pattern.
  438.  
  439.          ****  Print                    The Popup dialog for printing
  440.                                         messages.
  441.  
  442.          ****  Sort                     The custom sort dialog.
  443.  
  444.          ****  Templates                The Popup dialog for selecting a
  445.                                         template with which to initiate a
  446.                                         composition.
  447.  
  448.          ****  Textsearch               The Popup dialog for searching a
  449.                                         single body of text, and for
  450.                                         performing replacements and
  451.                                         spell-checking.
  452.  
  453.             *****  TextsearchReplace    The Textsearch dialog that also
  454.                                         includes replacing and
  455.                                         spell-checking.
  456.  
  457.          ****  Xface                    The Popup dialog for displaying a
  458.                                         crude ASCII rendering of the current
  459.                                         message's X-Face header, if any.
  460.  
  461.       ***  Screen                       All full-screen dialogs.
  462.  
  463.            goto-main                    Switch to the Main Screen.              [esc m]
  464.            next-screen                  Switch to the next screen.              [esc n]
  465.            other-screen                 Switch between two most recent          [esc o]
  466.                                         screens.
  467.  
  468.            previous-screen              Switch to the previous screen.          [esc p]
  469.  
  470.          ****  Aliases                  The aliases screen ("dialog
  471.                                         aliases").
  472.  
  473.          ****  Envelope                 The envelope screen ("dialog
  474.                                         envelope").
  475.  
  476.          ****  Headers                  The headers screen ("dialog
  477.                                         headers").
  478.  
  479.          ****  MenuScreen               All Screens having a menubar.
  480.  
  481.                cancel-menu              Return from the menubar.                [esc esc]
  482.                goto-menu                Jump to the menubar.                    [esc /]
  483.                pick-menu                Invoke a menu item by name.  See the
  484.                                         section on `pick-menu', below.
  485.  
  486.             *****  Compose              The compose screen.
  487.  
  488.                    goto-bcc-header      Move to the Bcc header.
  489.                    goto-body            Move to the message body.
  490.                    goto-cc-header       Move to the Cc header.
  491.  
  492.                    goto-subject-header
  493.                                         Move to the Subject header.
  494.  
  495.                    goto-to-header       Move to the To header.
  496.  
  497.             *****  Main                 The main screen.
  498.  
  499.                    goto-main-summaries
  500.                                         Move to the message summaries.
  501.  
  502.                    main-zscript-prompt                                          [esc :]
  503.                                         Move to the Command field, or if
  504.                                         that's not visible, present a
  505.                                         Z-Script prompt.
  506.  
  507.             *****  Message              The message-reading screen.
  508.  
  509.                    message-next-page-or-message                                 [space]
  510.                                         Show the next pageful of text, or
  511.                                         move to the next message if at the
  512.                                         end of the current message.
  513.  
  514.                    message-showface                                             [c-x f]
  515.                                         Pop up a crude ASCII rendering of
  516.                                         the current message's X-Face header,
  517.                                         if any.
  518.  
  519.          ****  Vars                     The variables screen ("dialog
  520.                                         variables").
  521.  
  522.     ** Filebox                          A container holding both the list of
  523.                                         files *and* the text entry area in
  524.                                         all file finders.
  525.  
  526.         filebox-down                    With the cursor in the text entry       [c-n]
  527.                                         area, move the selection down in the
  528.                                         file list.
  529.  
  530.         filebox-next-page               With the cursor in the text entry       [c-v]
  531.                                         area, show the next pageful in the
  532.                                         file list.
  533.  
  534.         filebox-previous-page           With the cursor in the text entry       [esc v]
  535.                                         area, show the previous pageful in
  536.                                         the file list.
  537.  
  538.         filebox-up                      With the cursor in the text entry       [c-p]
  539.                                         area, move the selection up in the
  540.                                         file list.
  541.  
  542.     **  List                            All lists.
  543.  
  544.         list-backward-char              Move the cursor backward one            [c-b]
  545.                                         character.
  546.  
  547.         list-beginning-of-line          Move the cursor to the beginning of     [c-a]
  548.                                         the line.
  549.  
  550.         list-click                      "Click" (select) the list item at       [space]
  551.                                         the cursor location.
  552.  
  553.         list-click-line                 "Click" a list item by number.  See
  554.                                         example below.
  555.  
  556.         list-controlclick               Behave like Motif CTRL+click; toggle    [.]
  557.                                         selection of the list item at the
  558.                                         cursor location.
  559.  
  560.         list-doubleclick                Behave like Motif doubleclick;          [enter]
  561.                                         select and activate the list item at
  562.                                         the cursor location.  Executing
  563.                                         list-click twice, rapidly, has the
  564.                                         same effect.
  565.  
  566.         list-down                       Move the cursor down.                   [c-n]
  567.         list-end-of-line                Move the cursor to the end of the       [c-e]
  568.                                         line.
  569.  
  570.         list-first                      Move to the first list item.            [esc <]
  571.         list-forward-char               Move the cursor forward one             [c-f]
  572.                                         character.
  573.  
  574.         list-jump-to                    Jump to the next list item that
  575.                                         begins with the letter or number
  576.                                         that invoked this action.
  577.  
  578.         list-last                       Move to the last list item.             [esc >]
  579.         list-next-page                  Show the next pageful.                  [c-v]
  580.         list-previous-page              Show the previous pageful.              [esc v]
  581.         list-scroll-down                Scroll down one line.                   [c-n]
  582.         list-scroll-up                  Scroll up one line.                     [c-p]
  583.         list-shiftclick                 Behave like Motif SHIFT+click;          [>]
  584.                                         extend selection to cursor location.
  585.  
  586.         list-up                         Move the cursor up.                     [c-p]
  587.  
  588.       ***  FileList                     All lists of filenames.
  589.  
  590.       ***  FolderStatusList             All lists of active folders.
  591.  
  592.       ***  MessageSummaries             All lists of message summaries.
  593.  
  594.     **  Taskmeter                       The taskmeter.
  595.  
  596.         taskmeter-interrupt             Interrupt a task.                       [space]
  597.  
  598.     **  Text                            All text areas.
  599.  
  600.         text-backward-char              Move backward one character.            [c-b]
  601.         text-backward-word              Move backward one word.                 [esc b]
  602.         text-beginning                  Move to the beginning of text.          [esc <]
  603.         text-beginning-of-line          Move to the beginning of the line.      [c-a]
  604.         text-copy-selection             Copy the selected text to the           [esc w]
  605.                                         clipboard.
  606.  
  607.         text-deselect                   Deselect the selected text.             [esc C]
  608.         text-end                        Move to the end of text.                [esc >]
  609.         text-end-of-line                Move to the end of the line.            [c-e]
  610.         text-forward-char               Move forward one character.             [c-f]
  611.         text-forward-word               Move forward one word.                  [esc f]
  612.         text-next-line                  Move to the next line.                  [c-n]
  613.         text-next-page                  Show the next pageful of text.          [c-v]
  614.         text-previous-line              Move to the previous line.              [c-p]
  615.         text-previous-page              Show the previous pageful of text.      [esc v]
  616.         text-resume-selecting           Resume selecting text.                  [esc r]
  617.         text-scroll-down                Scroll down one line.                   [esc q]
  618.         text-scroll-up                  Scroll up one line.                     [esc z]
  619.         text-select-all                 Select all text.
  620.         text-start-selecting            Start selecting text.                   [esc s]
  621.         text-stop-selecting             Stop selecting text.                    [esc e]
  622.         text-toggle-wrap                Toggle wrapping of long lines.          [W]
  623.  
  624.       ***  EditText                     All editable text areas.
  625.  
  626.            text-clear-selection         Delete the selected text.
  627.            text-cut-selection           Cut the selected text to the            [c-w]
  628.                                         clipboard.
  629.  
  630.            text-delete-backward-char    Delete one character backward.          [backspace]
  631.            text-delete-backward-word    Delete one word backward.               [esc backspace]
  632.            text-delete-forward-char     Delete one character forward.           [c-d]
  633.            text-delete-forward-word     Delete one word forward.                [esc d]
  634.  
  635.            text-delete-to-beginning-of-line                                     [c-u]
  636.                                         Delete from cursor to beginning of
  637.                                         line.
  638.  
  639.            text-delete-to-end-of-line                                           [c-k]
  640.                                         Delete from cursor to end of line.
  641.  
  642.            text-insert                  Insert specified text.  See example
  643.                                         below.
  644.  
  645.            text-open-line               Open a new line ahead of the cursor.    [c-o]
  646.  
  647.            text-paste                   Insert the contents of the              [c-y]
  648.                                         clipboard.
  649.  
  650.            text-self-insert             Insert the key just typed.
  651.  
  652.          ****  Inputfield               All one-line text entry areas.
  653.  
  654.                inputfield-accept        Accept current contents of the area.    [enter]
  655.  
  656.             *****  Commandfield         All Z-Script text entry areas.
  657.  
  658.                    command-accept       Accept contents of the area and         [enter]
  659.                                         execute as a Z-Script command.
  660.  
  661.                    command-history-backward                                     [c-p]
  662.                                         Move backward through history list.
  663.  
  664.                    command-history-forward                                      [c-n]
  665.                                         Move forward through history list.
  666.  
  667.  
  668. BINDKEY USAGE EXAMPLES
  669. ----------------------
  670.  
  671. Here are some simple examples of "bindkey" usage.
  672.  
  673.     bindkey -c EditText ^W text-delete-backward-word
  674.  
  675. This command causes <ctrl+W> to behave in editable texts the way it
  676. does in many shells; that is, it deletes one word to the left.
  677.  
  678.     bindkey -c Menu \<esc> menu-cancel
  679.  
  680. This command causes the Escape key to cancel a single menu level
  681. instead of canceling all pending menus.
  682.  
  683.     bindkey -c EditText ^U do-sequence '!* text-end-of-line !* text-delete-to-beginning-of-line'
  684.  
  685. This command causes <ctrl+U> to delete an entire line in editable
  686. texts.  By default, <ctrl+U> only deletes from the cursor position
  687. leftward, leaving any text to the right of the cursor untouched.
  688.  
  689.  
  690. ACTIONS THAT TAKE ADDITIONAL ARGUMENTS
  691. --------------------------------------
  692.  
  693. Certain actions to which you can bind keystrokes require additional
  694. arguments specifying what to do.
  695.  
  696.  
  697.   *  Widget
  698.  
  699.      do-sequence
  700.  
  701. This action is used to perform one or more actions in areas that may
  702. not be the same as the one where the keysequence was pressed.
  703. Example:
  704.  
  705.     bindkey -c Inputfield ^N do-sequence 'zmlite focus-next'
  706.  
  707. This command makes <ctrl+N> "tab out" of one-line text entry areas
  708. (`Inputfields').  To "tab" out of an area requires the action
  709. `focus-next', but `focus-next' is not an action understood by
  710. `Inputfield'-class areas.  Instead, `do-sequence' is used to perform
  711. the `focus-next' action in the area named `zmlite', which is a name
  712. for the enclosing `Zmliteapp' container.  The additional argument to
  713. do-sequence takes the form:
  714.  
  715.     NAME ACTION [ARGUMENT]
  716.  
  717. and must be surrounded by quotation marks.  NAME is the name of an
  718. area; it may *not* be a classname.  ACTION is the name of an action
  719. that can be performed in the area named NAME; and ARGUMENT is any
  720. additional argument required by ACTION.
  721.  
  722. The special name `*' in this context means "the area in which the
  723. keysequence was pressed".
  724.  
  725. You may use the quoted argument to specify more than one action to
  726. perform.  Each action is written as
  727.  
  728.     NAME ACTION [ARGUMENT]
  729.  
  730. and is separated from the following action by any single character not
  731. appearing elsewhere in the command; an exclamation point (`!') is a
  732. popular character to use.  Finally, the first character must be the
  733. separator character that you intend to use.  Here's the <ctrl+U>
  734. example from earlier in this document:
  735.  
  736.     bindkey -c EditText ^U do-sequence '!* text-end-of-line !* text-delete-to-beginning-of-line'
  737.  
  738. The first `!' introduces the separator character.  The `*' means "the
  739. area where this action was invoked."  The first action to perform is
  740. `text-end-of-line'.  The next `!' introduces a second action, which
  741. also applies to the area where the keysequence was pressed (`*'); and
  742. the action to perform is `text-delete-to-beginning-of-line'.
  743.  
  744.  
  745.     **  Buttonpanel
  746.  
  747.         buttonpanel-invoke
  748.  
  749. This action causes a button in the affected buttonpanel to be pressed.
  750. The additional argument required is the name of the button to press.
  751. Example:
  752.  
  753.     bindkey pager-aa D buttonpanel-invoke 'Done'
  754.  
  755.  
  756.     **  Dialog
  757.  
  758.         pick-action-area
  759.  
  760. This action is like `buttonpanel-invoke', but it's used in a `Dialog'
  761. context and refers to the buttons in the `ActionArea' at the bottom of
  762. the dialog, if there are any.  The preceding example is exactly
  763. equivalent to:
  764.  
  765.     bindkey -c Pager pick-action-area 'Done'
  766.  
  767.  
  768.         zscript
  769.  
  770. This action allows a keybinding to initiate any Z-Script command.  The
  771. additional argument is the Z-Script to execute.  Example:
  772.  
  773.     bindkey -c Main \<f8> zscript "quit"
  774.  
  775.  
  776.          ****  MenuPopup
  777.          ****  MenuScreen
  778.  
  779.                pick-menu
  780.  
  781. This action allows a menu item to be invoked from any dialog that has
  782. a menubar.  The additional argument required is the name of the menu
  783. item to invoke.  The name is constructed as follows:  Start at the
  784. menubar; write the name of each menu item in the path to the desired
  785. item, separating each with a period (`.'); and eliminate spaces and
  786. punctuation.  Case is not significant in the menu-item name.  So, for
  787. example, to make `I' find the "next reference by message ID" using the
  788. Main screen menus, you would write
  789.  
  790.     bindkey main I pick-menu find.nextReferenceBy.messageID
  791.  
  792.  
  793.     **  List
  794.  
  795.         list-click-line
  796.  
  797. This action allows you to click an item by its position in the list,
  798. starting at 1.  The additional argument required is the number of the
  799. item to click.
  800.  
  801.  
  802.       ***  EditText
  803.  
  804.            text-insert
  805.  
  806. This action allows you to insert a prearranged string into text.  For
  807. example, to make `esc S' "sign my name", I could write:
  808.  
  809.     bindkey -c EditText \eS text-insert 'Bob Glickstein'
  810.  
  811.  
  812. NAMED AREAS
  813. -----------
  814.  
  815. This is a list of all the areas in Z-Mail Lite that have individual
  816. names.  The class of each area appears in parentheses.  In some cases,
  817. a particular area may belong to one of two different classes depending
  818. on where it appears.  For example, `addrbrowse' is the name of the
  819. Address Browser dialog, which normally belongs to the class
  820. `Addrbrowse', but which belongs to the class `ComposeAddrbrowse' when
  821. invoked from the Compose screen.
  822.  
  823. No descriptions are given for the names in this list.  Instead, you
  824. may locate these areas by navigating in Z-Mail Lite and by using
  825. `ctrl+X w' (`widget-info') and `esc k' (`show-keys'), both of which
  826. give the name and class of the current area and its container(s).
  827.  
  828.  
  829. addrbrowse                      (Addrbrowse *or* ComposeAddrbrowse)
  830. addrbrowse-aa                   (ActionArea)
  831. addrbrowse-display-rg           (Radiogroup)
  832. addrbrowse-matches              (List)
  833. addrbrowse-pattern-field        (Inputfield)
  834. addrbrowse-recalls-field        (Inputfield)
  835. alias-address-field             (Inputfield)
  836. alias-name-field                (Inputfield)
  837. aliases                         (Aliases)
  838. aliases-aa                      (ActionArea)
  839. aliases-list                    (List)
  840. aliases-options-tg              (Togglegroup)
  841. ask                             (Ask)
  842. ask-aa                          (ActionArea)
  843. ask-choices                     (List)
  844. ask-command-field               (Commandfield)
  845. ask-filename-field              (Inputfield)
  846. ask-fl                          (FileList)
  847. ask-input-field                 (Inputfield)
  848. ask-mkdir-mkfolder-rg           (Radiogroup)
  849. ask-newname-field               (Inputfield)
  850. ask-read-onlyness-rg            (Radiogroup)
  851. ask-summaries                   (MessageSummaries)
  852. attach                          (ComposeAttachlist *or* MessageAttachlist)
  853. attach-aa                       (ActionArea)
  854. attach-comment                  (Inputfield)
  855. attach-encoding-menu            (Menu)
  856. attach-encoding-pullright       (PullrightMenu)
  857. attach-list                     (List)
  858. attach-type-menu                (Menu)
  859. attach-type-pullright           (PullrightMenu)
  860. attachtype                      (Attachtype)
  861. attachtype-aa                   (ActionArea)
  862. available-headers-list          (List)
  863. bcc-header-field                (Inputfield)
  864. cc-header-field                 (Inputfield)
  865. choosealiases                   (Choosealias)
  866. choosealiases-aa                (ActionArea)
  867. choosealiases-list              (List)
  868. command-field                   (Inputfield)
  869. compoptions                     (Compoptions)
  870. compoptions-aa                  (ActionArea)
  871. compoptions-log-field           (Inputfield)
  872. compoptions-record-field        (Inputfield)
  873. compoptions-log-tg              (Togglegroup)
  874. compoptions-options-tg          (Togglegroup)
  875. compoptions-record-tg           (Togglegroup)
  876. compose                         (Compose)
  877. compose-aa                      (ActionArea)
  878. compose-body                    (EditText)
  879. compose-messages-field          (Inputfield)
  880. date1-field                     (Inputfield)
  881. date2-field                     (Inputfield)
  882. datesearch                      (Datesearch)
  883. datesearch-aa                   (ActionArea)
  884. datesearch-function-list        (List)
  885. datesearch-messages-field       (Inputfield)
  886. datesearch-options-tg           (Togglegroup)
  887. datesearch-searchtype-rg        (Radiogroup)
  888. dynamic-bcc-header-field        (Inputfield)
  889. dynamic-cc-header-field         (Inputfield)
  890. dynamic-subject-header-field    (Inputfield)
  891. dynamic-to-header-field         (Inputfield)
  892. dynamicheaders                  (Dynamicheaders)
  893. dynamicheaders-aa               (ActionArea)
  894. dynamicheaders-menu             (Menu)
  895. envelope                        (Envelope)
  896. envelope-aa                     (ActionArea)
  897. envelope-header-contents-field  (Inputfield)
  898. envelope-header-name-field      (Inputfield)
  899. envelope-headers-list           (List)
  900. header-name-field               (Inputfield)
  901. header-settings-list            (List)
  902. headers                         (Headers)
  903. headers-aa                      (ActionArea)
  904. help                            (Help)
  905. help-aa                         (ActionArea)
  906. help-text                       (Text)
  907. helpindex                       (Helpindex)
  908. helpindex-aa                    (ActionArea)
  909. helpindex-text                  (Text)
  910. helpindex-topic-list            (List)
  911. helpindex-topic-rg              (Radiogroup)
  912. keyname-field                   (Inputfield)
  913. keynames-list                   (List)
  914. main                            (Main)
  915. main-aa                         (ActionArea)
  916. main-folder-field               (Inputfield)
  917. main-folder-list                (FolderStatusList)
  918. main-messages-field             (Inputfield)
  919. main-summaries                  (MessageSummaries)
  920. message                         (Message)
  921. message-aa                      (ActionArea)
  922. message-body                    (Text)
  923. message-messages-field          (Inputfield)
  924. multikey                        (Multikey)
  925. multikey-aa                     (ActionArea)
  926. output-text                     (Text)
  927. pager                           (Pager)
  928. pager-aa                        (ActionArea)
  929. pager-text                      (Text)
  930. patternsearch                   (Patternsearch)
  931. patternsearch-aa                (ActionArea)
  932. patternsearch-function-list     (List)
  933. patternsearch-messages-field    (Inputfield)
  934. patternsearch-options-tg        (Togglegroup)
  935. print                           (Print)
  936. print-aa                        (ActionArea)
  937. print-command-field             (Inputfield)
  938. print-headers-rg                (Radiogroup)
  939. print-messages-field            (Inputfield)
  940. printer-list                    (List)
  941. show-which-headers-rg           (Radiogroup)
  942. sort                            (Sort)
  943. sort-aa                         (ActionArea)
  944. sort-by-tg                      (Togglegroup)
  945. sort-options-tg                 (Togglegroup)
  946. sort-reverse-tg                 (Togglegroup)
  947. subject-header-field            (Inputfield)
  948. taskmeter                       (Taskmeter)
  949. template-list                   (List)
  950. templates                       (Templates)
  951. templates-aa                    (ActionArea)
  952. textsearch                      (Textsearch or TextsearchReplace)
  953. textsearch-aa                   (ActionArea)
  954. textsearch-pattern-field        (Inputfield)
  955. textsearch-replacement-field    (Inputfield)
  956. textsearch-text                 (Text *or* EditText)
  957. textsearch-word-list            (List)
  958. to-header-field                 (Inputfield)
  959. variable-description            (Text)
  960. variable-list                   (List)
  961. variable-multivalue-tg          (Togglegroup)
  962. variable-onoff-btnpanel         (Buttonpanel)
  963. variable-value-field            (Inputfield)
  964. variables                       (Vars)
  965. variables-aa                    (ActionArea)
  966. zmlite                          (Zmliteapp)
  967.  
  968.  
  969. ANSWERS TO FREQUENTLY-ASKED QUESTIONS ABOUT "bindkey"
  970. -----------------------------------------------------
  971.  
  972. Q:  What is the difference between an area's name and its class?
  973.  
  974. A:  An area's class is the category to which it belongs, the same way
  975. the word "sedan" is a category for many different particular cars.
  976. An area's name is a way to identify that one particular area among the
  977. others in the same class, the same way "Oldsmobile Cutlass" is a name
  978. for a particular sedan.
  979.  
  980.  
  981. Q:  Why do keybindings beginning with `esc' only sometimes work when I
  982. press them?
  983.  
  984. A:  A common error when using the Escape key is to use it like the
  985. Control key.  The Control key must be held down while pressing another
  986. key; in that respect, it is like the Shift key.  The Escape key,
  987. however, is more like a letter key, in that you must press and release
  988. it before pressing the next key.  If you hold down the Escape key, it
  989. will begin to repeat just like a letter key does.  The result is that
  990. Z-Mail Lite will attempt to interpret a string of many `esc'
  991. keypresses, which will usually be meaningless.
  992.  
  993.  
  994. Q:  Why do many classes have no actions associated with them?
  995.  
  996. A:  Such classes inherit actions from their superclasses, and they
  997. exist so that keybindings can be made in contexts that are specific
  998. enough.  For instance, the following keybinding for `<' moves up one
  999. directory level in a Filelist:
  1000.  
  1001.     bindkey -c Filelist '<' do-sequence '!* list-first !* list-doubleclick'
  1002.  
  1003. Although Filelist has no actions associated with it, it would be wrong
  1004. to use
  1005.  
  1006.     bindkey -c List '<' do-sequence '!* list-first !* list-doubleclick'
  1007.  
  1008. because, in lists that are not `Filelists'---for example, in a list of
  1009. message summaries---, it is meaningless to try to move up a directory
  1010. level.
  1011.  
  1012.  
  1013. Q:  Is this anything like "object-oriented"?
  1014.  
  1015. A:  Yes.  Classes inherit from one another just like in so-called
  1016. object-oriented design.  An area is an "instance" of the class to
  1017. which it belongs.  The actions for each class can be considered its
  1018. "methods".
  1019.